package com.lotus.lqmp.service.domain;

import com.lotus.lqmp.service.controller.vo.resp.XXXResp;
import com.lotus.lqmp.service.dao.dos.XXX;
import com.lotus.lqmp.service.dao.dos.YYY;
import com.lotus.lqmp.service.dao.mapper.XXXMapper;
import com.lotus.lqmp.service.dao.mapper.YYYMapper;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

/**
 * XXX实体的领域层
 * @author Liwei.Zhang3
 * @since 2021/12/30 17:08
 */
@Repository
public class XXXDomain {

    @Autowired
    private XXXMapper xxxMapper;

    @Autowired
    private YYYMapper yyyMapper;

    public XXXResp test() {
        //XXX xxx = xxxMapper.selectById(1L);
        // 一个领域包含一个或多个do
        XXX xxx = new XXX();
        YYY YYY = new YYY();
        XXXResp xxxResp = new XXXResp();
        BeanUtils.copyProperties(xxx, xxxResp);
        BeanUtils.copyProperties(YYY, xxxResp);
        return xxxResp;
    }
}
